﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Volo.Abp.Domain.Entities;
using Volo.Abp.MultiTenancy;

namespace WorkflowEngine.Entitys
{
    /// <summary>
    /// 用户或者部门可使用的app
    /// </summary>
    public class ObjectApp : AggregateRoot<Guid>, IMultiTenant
    {
        [Description("应用Id")]
        public Guid AppId { get; set; }
        [Description("对象类型：人，部门")]
        public ObjectType ObjectType { get; set; }
        [Description("对象Id")]
        public Guid ObjectId { get; set; }

        [Description("应用Id")]
        public virtual WorkflowApp WorkflowApp { get; set; }

        public Guid? TenantId { get; set; }
        public void SetTenantId(Guid tenantId) => TenantId = tenantId;

        [Description("是否显示，由用户设置是否显示")]
        public bool IsShow { get; set; }
    }
}
